export default [
  {
    type: 'flyTo',
    position: { x: -46.944451, y: 10.941558, z: 1.621663 },
    target: { x: -25.101737, y: -9.76, z: 1.668589 },
    duration: 3,
    stay: 0.5
  },
  { // 第一个工位点
    type: 'flyTo',
    position: { x: -33.542717, y: 3.201299, z: 0.839675 },
    target: { x: -14.584033, y: -2.828427, z: 5.376465 },
    duration: 2
  },
  {
    // 第一个工位点 -- 右转
    type: 'flyTo',
    angle: -76,
    position: { x: -33.542717, y: 3.201299, z: 0.839675 },
    target: { x: -33.358224, y: -2.828427, z: 20.332754 },
    duration: 2
  },
  {
    type: 'function',
    function: '卡板换装平台',
    isReverse: true,
    stay: 3 // 持续多少秒后退出聚焦
  },
  { // 1工位点 -- 左转
    type: 'flyTo',
    position: { x: -33.542717, y: 3.201299, z: 0.839675 },
    target: { x: -14.584033, y: -2.828427, z: 5.376465 },
    duration: 2
  },
  // 2工位点
  {
    type: 'flyTo',
    position: { x: 0.843604, y: 4.501596, z: 0.852675 },
    target: { x: 20.954556, y: -2.828427, z: 2.634288 },
    duration: 6
  },
  { // 2工位点  -- 右转
    type: 'flyTo',
    position: { x: 1.319383, y: 6.514835, z: -1.15164 },
    target: { x: 1.36635, y: -2.828427, z: 20.737231 },
    duration: 2
  },
  {
    type: 'function',
    function: '预连接',
    isReverse: true,
    stay: 3 // 持续多少秒后退出聚焦
  },
  { // 2工位点  -- 右转
    type: 'flyTo',
    position: { x: 0.843604, y: 4.501596, z: 0.852675 },
    target: { x: 20.954556, y: -2.828427, z: 2.634288 },
    duration: 2
  },
  // 3工位点
  {
    type: 'flyTo',
    position: { x: 33.352503, y: 4.915062, z: 1.112955 },
    target: { x: 49.475473, y: -1.840605, z: 1.330427 },
    duration: 5
  },
  { // 3 工位 -- 右转
    type: 'flyTo',
    position: { x: 33.983927, y: 4.793031, z: 2.607509 },
    target: { x: 34.211934, y: -1.851265, z: 18.776547 },
    duration: 2
  },
  {
    type: 'function',
    function: '自动钻铆',
    isReverse: true,
    stay: 3 // 持续多少秒后退出聚焦
  },
  { // 3 工位 -- 左转
    type: 'flyTo',
    position: { x: 33.352503, y: 4.915062, z: 1.112955 },
    target: { x: 49.475473, y: -1.840605, z: 1.330427 },
    duration: 2
  },
  // 4 工位
  { // 4 工位
    type: 'flyTo',
    position: { x: 40.502251, y: 2.090358, z: 0.979113 },
    target: { x: 49.972918, y: -0.916282, z: 1.366709 },
    duration: 2
  },
  { // 4 工位 -- 左转
    type: 'flyTo',
    position: { x: 43.503848, y: 2.298664, z: 0.401721 },
    target: { x: 43.260435, y: -1.212255, z: -14.978689 },
    duration: 2
  },
  {
    type: 'function',
    function: '门框壁板装配站位',
    stay: 3
  },
  { // 4 工位 -- 再左转
    type: 'flyTo',
    position: { x: 43.392211, y: 2.298664, z: 0.753174 },
    target: { x: 28.070613, y: -1.212255, z: -0.612437 },
    duration: 2
  },

  // 5 工位
  {
    type: 'flyTo',
    position: { x: 22.784433, y: 4.135419, z: 1.260737 },
    target: { x: 7.208292, y: -1.212255, z: -0.889408 },
    duration: 4
  },
  { // 5 -- 右转
    type: 'flyTo',
    position: { x: 18.540135, y: 3.35832, z: 3.071333 },
    target: { x: 18.662978, y: -1.212255, z: -15.752486 },
    duration: 2
  },
  {
    type: 'function',
    function: '超级壁板站位',
    stay: 3
  },
  { //  5 -- 左转
    type: 'flyTo',
    position: { x: 22.784433, y: 4.135419, z: 1.260737 },
    target: { x: 7.208292, y: -1.212255, z: -0.889408 },
    duration: 2
  },

  // 6工位
  {
    type: 'flyTo',
    position: { x: 6.400904, y: 3.325099, z: 1.105662 },
    target: { x: -13.476434, y: -1.212255, z: 1.395105 },
    duration: 2
  },
  { // 6 -- 右转
    type: 'flyTo',
    position: { x: 0.312276, y: 3.875839, z: 2.723673 },
    target: { x: 0.18229, y: -1.212255, z: -15.966854 },
    duration: 2
  },
  {
    type: 'function',
    function: '半部装配站位',
    stay: 3
  },
  {
    type: 'function',
    function: '翻转工装',
    stay: 3
  },

  { // 6 -- 左转
    type: 'flyTo',
    position: { x: 6.400904, y: 3.325099, z: 1.105662 },
    target: { x: -13.476434, y: -1.212255, z: 1.395105 },
    duration: 2
  },

  // 7工位
  {
    type: 'flyTo',
    position: { x: -9.706654, y: 3.141628, z: 1.214839 },
    target: { x: -24.835099, y: -1.212255, z: 2.271558 },
    duration: 3

  },
  { // 7 -- 右转
    type: 'flyTo',
    position: { x: -16.629066, y: 5.559074, z: 4.015398 },
    target: { x: -16.753545, y: -1.212255, z: -16.352017 },
    duration: 2

  },

  {
    type: 'function',
    function: '总装站位',
    stay: 3
  },
  { // 7 -- 左转
    type: 'flyTo',
    position: { x: -9.706654, y: 3.141628, z: 1.214839 },
    target: { x: -24.835099, y: -1.212255, z: 2.271558 },
    duration: 2
  },

  // 8工位
  {
    type: 'flyTo',
    position: { x: -27.687877, y: 8.19056, z: 1.182199 },
    target: { x: -49.961078, y: -1.969043, z: 0.116368 },
    duration: 3
  },
  { // 8-- 右转
    type: 'flyTo',
    position: { x: -33.084627, y: 9.288828, z: 5.093034 },
    target: { x: -33.628079, y: -1.968349, z: -19.608676 },
    duration: 3
  },
  {
    type: 'function',
    function: '总装架外站位',
    stay: 3
  },
  {
    type: 'flyTo',
    position: { x: -27.687877, y: 8.19056, z: 1.182199 },
    target: { x: -49.961078, y: -1.969043, z: 0.116368 },
    duration: 3
  }
]

// async function test () {
//   for (const entry of arr.entries()) {
//     const index = entry[0]
//     const item = entry[1]
//     LastCallIndex.value = index
//     if (item.type === 'flyTo') {
//       await window.sandbox.flyTo({ position: item.position, target: item.target, duration: item.duration, stay: item.stay })
//     }
//     if (item.type === 'function') {
//       await new Promise((resolve) => {
//         console.log('进入卡板')
//         Enterpanel(item.function)
//         setTimeout(() => {
//           resolve()
//           console.log('退出卡板')
//           store.commit('setCurrentRegionName', '')
//           store.commit('setDeviceListId', '')
//           ResetScene(false)
//         }, item.stay * 1000)
//       })
//     }

//     if (index === arr.length - 1) {
//       LastCallIndex.value = -1
//       test()
//     }
//   }
// }
